package com.kfm.spring.controller;

import com.kfm.spring.domain.Account;
import com.kfm.spring.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/account")
public class AccountController {

    @Autowired
    private AccountService service;

    @RequestMapping
    public List<Account> accounts(){
        return service.findAll();
    }
}

